﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dahtd4ever
{
    public class Level
    {
        String description;
            public String getDescription() { return this.description; }
            public void setDescription(String input) { this.description = input; }
        bool completed;
            public bool getCompleted() { return completed; }
            public void setCompleted(bool input){ this.completed = input; }
        int id;
            public int getId() { return this.id; }
            public void setId(int id) { this.id = id; }
        int waveCount;
            public int getWaveCount() { return this.waveCount; }
            public void setWaveCount(int waveCount){ this.waveCount = waveCount;}
        string mapDirectory;
            public string getMapDirectory() { return this.mapDirectory; }
            public void setMapDirectory(string dir) { this.mapDirectory = dir; }
        float resources;
            public float getResources () {return this.resources;}
            public void setResources(float r) { this.resources = r; }
        float playersLife;
            public void setPlayersLife(float l) { this.playersLife = l; }
            public float getPlayersLife() { return this.playersLife; }
        float enemySpawnTime;
            public float getEnemySpawnTime() { return this.enemySpawnTime; }
            public void setEnemySpawnTime(float enemySpawnTime) { this.enemySpawnTime = enemySpawnTime; }

        List<Wave> waves;
            public List<Wave> getWaves(){return this.waves;}
            public void setWaves(List<Wave> waves){ this.waves =waves;}

        List<Tower> possibleTowers;
            public List<Tower> getPossibleTowers() { return this.possibleTowers; }
            public void setPossibleTowers(List<Tower> towers) { this.possibleTowers = towers; }
            public void addPossibleTower(Tower t) { possibleTowers.Add(t); }
        List<int> possibleTowersInInt;
            public void setPossibleTowers(List<int> towers) { this.possibleTowersInInt = towers; }
            public void addPossibleTowersInInt(int input) { 
                this.possibleTowersInInt.Add(input);                                    
            }
            public Tower findTowerByType(int type) {
                Tower t = new Tower();
                for (int i = 0; i < possibleTowers.Count; i++) {
                    if (possibleTowers[i].getType() == type) { t = possibleTowers[i]; }
                }
                return t;
            }

            public Level()
        {
            waves = new List<Wave>();
            possibleTowers = new List<Tower>();
            possibleTowersInInt = new List<int>();   
        }
    }
}
